﻿using Inovout.Models;
using Inovout.Services;
using Inovout.YunYao.Models;
using Inovout.YunYao.Repositories;

namespace Inovout.YunYao.Services
{
    public class MonitorinNodeService : MonitoringElementService< MonitoringNode>
    {
        public override void Save(MonitoringNode node)
        {
            bool insert = node.Id == null;
            base.Save(node);
            if (insert)
            {
                node.Code = node.Solution.Code.ToString() + node.Id.ToString("000000000");

                base.Save(node);
            }
        }
    }
}
